package com.sinoglobal.dumping.view;

import android.app.Activity;
import android.app.Dialog;
import android.content.Intent;
import android.view.View;
import android.widget.Button;

import com.sinoglobal.dumping.R;
import com.sinoglobal.dumping.activity.Dumpling_MainActivity;

/**
 * Created by tml on 2015/12/18.
 */
public class Dumpling_CancelSendDumplingsDialog extends Dialog implements View.OnClickListener{
    private Activity mActivity;

    public Dumpling_CancelSendDumplingsDialog(Activity context) {
        super(context, R.style.dumpling_dialog);
        mActivity=context;
        View view = View.inflate(context, R.layout.dumpling_dialog_cancel_send, null);
        Button cancelBtn = (Button) view.findViewById(R.id.diaolog_cancel_dumplings);
        Button sendBtn = (Button) view.findViewById(R.id.diaolog_send_dumplings);
        cancelBtn.setOnClickListener(this);
        sendBtn.setOnClickListener(this);
        setContentView(view);
    }


    @Override
    public void onClick(View v) {
        if (R.id.diaolog_cancel_dumplings==v.getId()) {
            mActivity.startActivity(new Intent(mActivity, Dumpling_MainActivity.class));
            mActivity.overridePendingTransition(R.anim.dumpling_activity_on, R.anim.dumpling_activity_off);
        }
        dismiss();
    }
}
